package com.jrx.anytxn.investor.mapper.ext;

import com.jrx.anytxn.investor.entity.TlFundTransferLog;
import com.jrx.anytxn.investor.mapper.base.TlFundTransferLogMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExtTlFundTransferLogMapper extends TlFundTransferLogMapper {

    void batchInsert(List<TlFundTransferLog> list);

    void batchUpdateForBatch(List<TlFundTransferLog> list);

    /**
     * 根据订单id，转账类型，最终状态查询资金转账流水
     *
     * @param loanId       订单id
     * @param transferType 转账类型
     * @param sumStatus    最终状态
     * @param tenantId     租户id
     * @return TlFundTransferLog 资金转账流水
     * @author liuyang
     * @date 2020-6-17
     */
    TlFundTransferLog selectByLoanIdTypeStatus(@Param("loanId") String loanId, @Param("transferType") String transferType, @Param("sumStatus") String sumStatus, @Param("tenantId") String tenantId);

    /**
     * 批量查询转账信息
     * @param transferType
     * @param sumStatus
     * @return
     */
    List<TlFundTransferLog> selectByTypeStatusForBatch(@Param("transferType") String transferType,
                                                       @Param("sumStatus") String sumStatus);

}